package com.lipaluma.parser.marshalling;

import java.util.ArrayList;
import java.util.List;


public class ObjectMarshalled {

	private List<FieldMarshalled> fieldsMarshalled = new ArrayList<FieldMarshalled>();
	private List<OneToManyFieldMarshalled> oneToManyFieldsMarshalled = new ArrayList<OneToManyFieldMarshalled>();
	
	public void addFieldMarshalled(FieldMarshalled fieldMarshalled) {
		fieldsMarshalled.add(fieldMarshalled);
	}
	
	
	public void addOneToManyFieldMarshalled(OneToManyFieldMarshalled oneToManyFieldMarshalled) {
		oneToManyFieldsMarshalled.add(oneToManyFieldMarshalled);
	}
	
	public List<FieldMarshalled> getFieldsMarshalled() {
		return fieldsMarshalled;
	}
	
	public List<OneToManyFieldMarshalled> getOneToManyFieldsMarshalled() {
		return oneToManyFieldsMarshalled;
	}
	
	public void copy(ObjectMarshalled source) {
		this.fieldsMarshalled.addAll(source.fieldsMarshalled);
		this.oneToManyFieldsMarshalled.addAll(source.oneToManyFieldsMarshalled);
	}
}
